import request from '../utils/request'

export const hotShops = () => {
  return request({
    method: 'GET',
    url: '/api/shop/hot-list'
  })
}

export const shopApi = (id) => {
  return request({
    method: 'GET',
    url: `/api/shop/${id}`
  })
}

export const goodsInfo = (id, params) => {
  return request({
    method: 'GET',
    url: `/api/shop/${id}/products`,
    params
  })
}

export const commitOrder = data => {
  return request({
    method: 'POST',
    url: '/api/order',
    data
  })
}

export const getOrderInfo = () => {
  return request({
    method: 'GET',
    url: '/api/order'
  })
}
